//排序分类组件
import React, { Component } from 'react'

class Tabs extends Component {
  render() {
    return (
      //排序 Tabs
      <div className="tabs-order">
        {this.props.tabs.map(item => (
          <div
            key={item.id}
            className={item.type === this.props.active ? 'on' : ''}
            onClick={() => this.props.changeTab(item.type)}
          >
            按{item.name}排序
          </div>
        ))}
      </div>
    )
  }
}

export default Tabs
